package cn.htu.edu.controller;


import cn.htu.edu.common.ResponseHelper;
import cn.htu.edu.common.ResponseModel;
import cn.htu.edu.entity.Echarts;
import cn.htu.edu.mapper.EchartsMapper;
import cn.htu.edu.service.IEchartsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 * @author dakai
 * @since 2021-11-24
 */
@RestController
@Api(value = "图表相关接口",tags="图表相关接口")
@RequestMapping("/echarts")
public class EchartsController {

    @Resource
    private EchartsMapper echartsMapper;

    @ApiOperation("查询")
    @GetMapping("/select2")
    public ResponseModel selectDetails() {
        List<Echarts> add = echartsMapper.selectEcharts();
        return ResponseHelper.buildResponseModel(add);
    }
}
